package com.mj.myvirtualapp;

import android.content.ComponentName;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void openApp(View view) {
        Intent intent = new Intent(this,HostActivity1.class);
//        intent.setComponent(new ComponentName("com.mj.myvirtualapp.plugin","com.mj.myvirtualapp.plugin.MainActivity"));
        intent.putExtra("isPlugin",true);
        intent.putExtra(Constants.KEY_TARGET_ACTIVITY,"com.mj.myvirtualapp.plugin.MainActivity");
        intent.putExtra(Constants.KEY_TARGET_PACKAGE,"com.mj.myvirtualapp.plugin");
        startActivity(intent);
    }

    public void openNormal(View view) {
        startActivity(new Intent(this,HostActivity1.class));
    }
}
